import { defineStore } from 'pinia'

interface IForm {
  // 删除样式
  contentRemoveStyle: '0' | '1' | '2' | '3' | '4'
  // 删除方式
  contentRemoveMethod: '0' | '1'
  // 删除内容
  contentRemoveText: string | undefined
  // 文件名前 / 后
  fileNamePosition: '0' | '1'
  // 第..个字符
  charAtPositionN: number
  // 共删除..个字符
  removeCharCount: number
}

const useContentRemoveFormStore = defineStore('contentRemoveForm', {
  state(): IForm {
    return {
      contentRemoveStyle: '4',
      contentRemoveMethod: '0',
      contentRemoveText: undefined,
      fileNamePosition: '0',
      charAtPositionN: 0,
      removeCharCount: 0
    }
  }
})

export default useContentRemoveFormStore
